# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月19日
"""
import openpyxl

myBook = openpyxl.load_workbook('收入表.xlsx')
mySheet=myBook.active
myList=list(mySheet.values)[4:8]
myListC1=[myList[i][1] for i in range(len(myList))]
mySheet.cell(9,2).value=sum(myListC1)
myListC2=[myList[i][2] for i in range(len(myList))]
mySheet.cell(9,3).value=sum(myListC2)

myListC3=[myList[i][3] for i in range(len(myList))]
mySheet.cell(9,4).value=sum(myListC3)
myBook.save('收入表.xlsx')